/*
 * @Description: 
 * @Author: 赵大壮
 * @Date: 2021-12-06 17:18:37
 * @LastEditTime: 2021-12-06 17:36:29
 * @LastEditors: 赵大壮
 */
import { Component, Vue, Inject } from "vue-property-decorator";
import DZServiceOrder from "../service/DZServiceOrder";
import UiDialogOrderAssessInfo from '@/components/ui-dialog/UiDialogOrderAssessInfo.vue'
import UiDialogOrderExpertInfo from '@/components/ui-dialog/UiDialogOrderExpertInfo.vue'
@Component({
    components: { UiDialogOrderAssessInfo, UiDialogOrderExpertInfo }
})
export default class Index extends Vue {

    s_order = new DZServiceOrder();

    dialog_inif_assess = false;

    dialog_info_expert = false;

    created() { }

    mounted() {
        this.action_list_order();
    }

    beforeDestroy() {

    }

    action_list_order() {
        this.s_order.net_list_order();
    }

    action_page_change(val) {
        this.s_order.m_page.page = val;
        this.action_list_order();
    }

    action_status_text(status) {
        var text = '';
        switch (status) {
            case 0:
                text = '已取消'
                break;
            case 1:
                text = '未支付'
                break;
            case 2:
                text = '已支付'
                break;
        }
        return text;
    }
    action_status_text_style(status) {
        var style = '';
        switch (status) {
            case 0:
                style = 'text-cb'
                break;
            case 1:
                style = 'text-calt'
                break;
            case 2:
                style = 'text-cmain_deep'
                break;
        }
        return style;
    }

    action_info_data(type, orderNum) {
        if (type == 1) {
            this.s_order.m_user_assess_info.orderNum = orderNum;
            this.s_order.net_assess_info(() => {
                this.dialog_inif_assess = true;
            })
        } else {
            this.s_order.m_user_expert_info.orderNum = orderNum;
            this.s_order.net_expert_info(() => {
                this.dialog_info_expert = true;
            })
        }

    }
}